<?php
class User extends Doctrine_Record
{
	public function setTableDefinition()
	{
		$this->setTableName('person.users');

		$this->hasColumn('name', 'string', 30);
		$this->hasColumn('login', 'string', 30);
		$this->hasColumn('password', 'string', 255);
		$this->hasColumn('email', 'string', 255);
	}

	public function setUp()
	{
        $this->hasMany('Group as groups', array(
                'local'=>'user_id',
                'foreign'=>'group_id',
                'refClass'=>'UserGroup'
        ));
	}
}
?>